<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
  <head>
    <html:base />
    
    <title>purchasing.jsp</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	
	-->
	<script language="javascript">
	function abc(){
		return window.confirm("确定要删除吗?");
	}
		function add(){
		window.open("addprovider.jsp","_self");
	}
	</script>
	  ${requestScope.message}
  </head>
  
  <body>
   <%@ include file="header.jsp"%>
   <table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="120" valign="top" background="../images/in_left_bg.gif"><%@ include file="messageLeft.jsp"%></td>
    <td width="660" align="center" valign="top">
     <h2 align="center">供应商信息列表</h2>
     <table rules="none" width="640"  border="1" cellpadding="3" cellspacing="0" bordercolor="#CCCCCC">
      <tr align="center" bgcolor="#E1EEF8">
	 <td  colspan="2" ><input type="button" value="添加 " onclick="add();"/></td>
	  <td colspan="2"></td><td colspan="3" ><a href="provManage.do?flag=search">查询</a></td>
	  </tr>
     </table>
   
  <table width="640"  border="1" cellpadding="3" cellspacing="0" bordercolor="#CCCCCC">
  <tr bgcolor="pink">
    <td align="center">供应商编号</td>
    <td align="center">供应商名称</td>
    <td align="center">联系人</td>
  	<td align="center">联系电话</td>
    <td align="center">联系地址</td>
    <td align="center" colspan="2">操作</td>
   </tr>
    <c:forEach var="list" items="${requestScope.list}">
     <tr>
		<td align="center">${list.proCode}</td>
		<td align="center">${list.proName}</td>
	    <td align="center">${list.proLinkman}</td>
	  	<td align="center">${list.proPhone}</td>
	    <td align="center">${list.proAddress}</td>
	    <td align="center" bgcolor="#E1EEF8"><a href="changeprovider.jsp?id=${list.proCode }">修改</a></td>
	    <td align="center" bgcolor="#E1EEF8"><a href="provManage.do?flag=delete&id=${list.proCode }" onclick="return abc();">删除</a></td>
   </tr>
    </c:forEach>
</table>
<div align="center">当前页${requestScope.pagenow}/总页数${requestScope.pagecount}
      <a href="provManage.do?pagenow=1&flag=page">首页</a>
      <a href="provManage.do?pagenow=${requestScope.pagenow-1<=0?1:requestScope.pagenow-1}&flag=page">上一页</a>
      <a href="provManage.do?pagenow=${requestScope.pagenow+1>=requestScope.pagecount?requestScope.pagecount:requestScope.pagenow+1}&flag=page">下一页</a>
      <a href="provManage.do?pagenow=${requestScope.pagecount}&flag=page">末页</a>
      </div>
      </td>
</tr>
</table>
    
<%@ include file="footer.jsp"%>
  </body>
</html:html>
